package com.eas.biz.service.exam.domain;

import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

public class ExamSubjectDetail {

    private Exam exam;

    private String subject;

    private Integer totalScore;

    private Integer questionCount;

    private Map<String, ExamQuestionDetail> questionDetailMap;

    private List<ExamQuestionDetail> questionDetailList;

    public ExamSubjectDetail() {
        questionDetailMap = new HashMap<String, ExamQuestionDetail>();
        questionDetailList = new LinkedList<ExamQuestionDetail>();
    }

    public ExamQuestionDetail getQuestionDetail(String questionNumber) {
        return questionDetailMap.get(questionNumber);
    }

    public void addQuestionDetail(ExamQuestionDetail detail) {
        if (detail != null) {
            questionDetailMap.put(detail.getQuestionNumber(), detail);
            questionDetailList.add(detail);
        }
    }

    public Exam getExam() {
        return exam;
    }

    public void setExam(Exam exam) {
        this.exam = exam;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public Integer getTotalScore() {
        return totalScore;
    }

    public void setTotalScore(Integer totalScore) {
        this.totalScore = totalScore;
    }

    public Integer getQuestionCount() {
        return questionCount;
    }

    public void setQuestionCount(Integer questionCount) {
        this.questionCount = questionCount;
    }

    public Map<String, ExamQuestionDetail> getQuestionDetailMap() {
        return questionDetailMap;
    }

    public List<ExamQuestionDetail> getQuestionDetailList() {
        return questionDetailList;
    }

}
